﻿<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=EDGE;IE=11;IE=8,chrome=1" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>排故单附页查看</title>
    <link href="/InSiteWebApplication/Content/Easyui/themes/metro/easyui.css" rel="stylesheet" />
    <link href="/InSiteWebApplication/Content/Easyui/custom-easyui.css" rel="stylesheet" />
    <link href="/InSiteWebApplication/Content/Easyui/themes/icon.css" rel="stylesheet" />
    <link rel="stylesheet" href="/InSiteWebApplication/Content/webuploader/webuploader.css" />
    <style>
        .easyui-linkbutton{margin-left:20px;}
        table tr td{padding:0px 5px}
        .webuploader-pick{padding:0px 0px;border-radius:0px}
    </style>
</head>
<body>
    <div class="panelSection">
        <div id="DealFaultBillName" style="text-align:right;margin-right:20px;line-height:30px;"></div>    
        <table id="DealFaultBillSheet" style="height:450px"></table>
    </div>
     <!--信息提示区域-->
    <div id="statusMessage" style="font-size: 14px; height: 40px"></div>
</body>
</html>
<script src="/InSiteWebApplication/Scripts/json2.js" type="text/javascript"></script>
<script src="/InSiteWebApplication/Content/Easyui/jquery.min.js" type="text/javascript"></script>
<script src="/InSiteWebApplication/Content/Easyui/jquery.easyui.min.js" type="text/javascript"></script>
<script src="/InSiteWebApplication/Content/Easyui/easyui-lang-zh_CN.js" type="text/javascript"></script>
<script src="/InSiteWebApplication/Scripts/CustomPageJs/CustomCommon.js" type="text/javascript"></script>
<script type="text/javascript">
    //创建人：longb
    //日期：2023-06-16
    //描述：排故单附页查看
    var page = {
        rootPath: getRootPath(), //网站根路径
        ajaxUrl: getRootPath() + "/Ashx/ZsHandler/ZSDealFaultBillHandler.ashx",
        dealFaultBillId: getParam("id"),
        //初始化页面
        init: function () {
            page.bind();
            page.getDealFaultBillSheet();
        },
        //页面事件绑定
        bind: function () {
            $('#DealFaultBillSheet').datagrid({
                //rownumbers: true,
                fitColumns:true,
                columns: [[
                 { field: 'SHEETNO', title: '序号', width: 80 },
                 { field: 'PRODUCTNAME', title: '零件号', width: 140 },
		         { field: 'PRODUCTDESC', title: '零件名称', width: 140 },
                 { field: 'BATCHNO', title: '批次号', width: 100 },
                 { field: 'BATCHQTY', title: '批次数量', width: 100 },
                 { field: 'NOTE', title: '备注', width: 150 }
                ]]
            });
        },
        //查询排故单附页信息
        getDealFaultBillSheet: function () {
            var param = {
                action: "GetDealFaultBillSheet",
                dealFaultBillId: page.dealFaultBillId 
            };
            page.post(param, function (res) {
                if (res.DBTable.length>0) {
                    $('#DealFaultBillName').html(res.DBTable[0].DEALFAULTBILLNAME);
                }
                $('#DealFaultBillSheet').datagrid('loadData', res.DBTable);
            });
        },
        //post数据
        post: function (param, callback) {
            $.ajax({
                type: "Post",
                url: page.ajaxUrl,
                data: param,
                cashe: false,
                async: true,
                dataType: "json",
                beforeSend: function () {
                    $.messager.progress({ text: '', msg: '处理中...' });
                },
                success: function (data) {
                    $.messager.progress('close');
                    callback(data);
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    $.messager.progress('close');
                    displayMessage(XMLHttpRequest.responseText, false);
                }
            });
        }
    }
    $(function () {
        page.init();
    });
</script>
